#include <iostream>
#include<cstring>
#include<assert.h>
using namespace std;
void* my_memove(void* dest, const void* src, size_t num)
{
    void* ret = dest;
    assert(dest && src);
    if (dest < src)
    {
        while (num--)
        {
            *(char*)dest = *(char*)src;
            dest = (char*)dest + 1;
            src = (char*)src + 1;
        }

    }
    else
    {
        while (num--)
        {
            *((char*)dest + num) = *((char*)src + num);
        }

    }
    return ret;
}
int main()
{
    int arr1[] = { 1,2,3,4,5,6,7,8,9,10 };
    int arr2[30] = { 0 };
    my_memove(arr2, arr1, 20);
    int i = 0;
    for (i = 0; i < 20; i++)
    {
        cout << arr2[i];
    }
    return 0;


}